package tt.dz.util;

import tt.dz.util.OmsConstant.CardTypeEnum;

public class CardUtils
{

	public static String generateCardType(String userCard)
	{
		if (userCard.startsWith("18806"))
		{
			return OmsConstant.CardTypeEnum.Cash;
		}
		//身份认证卡
		else if (userCard.startsWith("18805"))
		{
			return OmsConstant.CardTypeEnum.Identity;
		}
		//线上卡
		else if (userCard.startsWith("18808"))
		{
			if(!userCard.substring(0, 9).equals("188089999"))
				return OmsConstant.CardTypeEnum.OnlineApp;
			return OmsConstant.CardTypeEnum.OnlineCompany;
		}
		else
			return null;
	}
	
	public static void main(String[] args) {
		System.err.println(CardUtils.generateCardType("18808000010000001672").equals(CardTypeEnum.OnlineApp));
	}
}
